<?php
ini_set("zlib.output_compression", 1);
ini_set("zlib.output_compression_level", 1);

function gzipcallback($buffer) {
	if(strlen($buffer) < 4096000) {
		header("Content-Encoding: gzip");
		return gzencode($buffer);
	} else {
		return $buffer;
	}
}

if(isset($_SERVER["HTTP_ACCEPT_ENCODING"]) AND !(strstr($_SERVER["HTTP_ACCEPT_ENCODING"], "gzip") == false)) {
	ob_start("gzipcallback");
}
header("Content-type: text/javascript; charset: UTF-8");
header("Expires: Thu, 31 Dec ".date("Y")." 23:59:59 GMT");

$__js = array(
	"../js/jquery.js",
	"../js/jquery.masonry.min.js",
	"../js/jquery.nicescroll.min.js",
	"../js/script.js",

	"../scroll/js/jquery-ui-1.8.23.custom.min.js",
	"../scroll/js/jquery.mousewheel.min.js",
	"../scroll/js/jquery.kinetic.js",
	"../scroll/js/jquery.smoothdivscroll-1.3-min.js",

	"../loadmask/jquery.loadmask.min.js",
	"../smartwizard/js/jquery.smartWizard.js",
	"../tooltip/jquery.tools.min.js",
	"../autocomplete/js/jquery.autocomplete.js",
);


foreach($__js as $file) {
	echo file_get_contents($file);
}
?>